﻿// ***********************************************************************
// Assembly         : MVC4Portal
// Author           : LJO+01 (Laurent Jordi)
// Created          : 06-05-2013
// Last Modified By : LJO+01 (Laurent Jordi)
// Last Modified On : 06-05-2013
// ***********************************************************************
// <copyright file="ScriptsGController.cs" company="Copyright © Innovacall 2011">
//     Copyright (c) Copyright © Innovacall 2011. All rights reserved.
// </copyright>
// <summary></summary>
// ***********************************************************************
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using InnovaApp.Layers.ResourcesLayer.Properties;
using InnovaApp.Portals.MVC4Portal.Models.ClientFilesGenerationModels;
using System.Globalization;
using System.Threading;

namespace InnovaApp.Portals.MVC4Portal.Controllers.ClientFilesGenerationControllers
{
    /// <summary>
    /// Class ScriptsGController
    /// </summary>
    public partial class ScriptsGController : _ClientFilesGenerationControllers_Base
    {
        /// <summary>
        /// The _to return
        /// </summary>
        private ScriptGModel _toReturn;
        /// <summary>
        /// Gets to return.
        /// </summary>
        /// <value>To return.</value>
        protected ScriptGModel toReturn
        {
            get
            {
                if (_toReturn == null)
                {
                    _toReturn = new ScriptGModel();
                    _toReturn.Variables.Add("cap_DialogErrorTitle", Resources.View_All_DialogErrorTitle);
                    _toReturn.Variables.Add("cap_OpeningMessageTitle", Resources.View_All_cap_OpeningMessageTitle);
                    _toReturn.Variables.Add("cap_YesButtonCaption", Resources.cap_YesButtonCaption);
                    _toReturn.Variables.Add("cap_NoButtonCaption", Resources.cap_NoButtonCaption);
                }
                return _toReturn;
            }
        }
        /// <summary>
        /// LocalizeDynamicScripts
        /// </summary>
        /// <param name="language"></param>
        protected void LocalizeDynamicScripts(string language) {
            var ci = CultureInfo.CreateSpecificCulture(language);
            Thread.CurrentThread.CurrentUICulture = ci;
            Thread.CurrentThread.CurrentCulture = ci;
        }
    }
}
